<template>
  <a-drawer
    width="35%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="公司名称" prop="companyName">
              <a-input
                v-model="form.companyName"
                placeholder="请输入公司名称"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="联系人" prop="lianxiUser">
              <a-input v-model="form.lianxiUser" placeholder="请输入联系人" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="联系电话" prop="lianxiPhone">
              <a-input
                v-model="form.lianxiPhone"
                placeholder="请输入联系电话"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="进线群机器人地址" prop="lianxiAddress">
              <a-input
                v-model="form.lianxiAddress"
                placeholder="请输入进线群机器人地址"
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="沟通群机器人地址" prop="lianxiAddress">
              <a-input
                v-model="form.remark"
                placeholder="请输入沟通群机器人地址"
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="参数（json）" prop="aliyunKey">
              <a-textarea
                v-model="form.aliyunKey"
                placeholder="请输入接口参数json格式"
                :rows="4"
              ></a-textarea>
            </a-form-model-item>
          </a-col>
          <!-- <a-col :span="12">
          <a-form-model-item label="有效时间" prop="youxiaoshij">
            <a-input-number
              v-model="form.youxiaoshij"
              placeholder="请输入有效时间(年)"
              :min="1"
            />
          </a-form-model-item>
        </a-col> -->
          <!-- <a-col :span="12">
          <a-form-model-item label="阿里云KeyID" prop="aliyunKey">
            <a-input v-model="form.aliyunKey" placeholder="请输入阿里云k" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="密钥" prop="aliyunAccesssecret">
            <a-input
              v-model="form.aliyunAccesssecret"
              placeholder="请输入密钥"
              type="password"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="短信签名" prop="smsSignname">
            <a-input v-model="form.smsSignname" placeholder="请输入短信签名" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="短信通知" prop="smsIsopen">
            <a-radio-group v-model="form.smsIsopen" button-style="solid">
              <a-radio-button
                v-for="(dict, index) in smsIsopenOptions"
                :key="index"
                :value="dict.dictValue"
              >
                {{ dict.dictLabel }}
              </a-radio-button>
            </a-radio-group>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="OSS文件存储" prop="ossIsopen">
            <a-radio-group v-model="form.ossIsopen" button-style="solid">
              <a-radio-button
                v-for="(dict, index) in ossIsopenOptions"
                :key="index"
                :value="dict.dictValue"
              >
                {{ dict.dictLabel }}
              </a-radio-button>
            </a-radio-group>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="OSS地域名称" prop="endpoint">
            <a-input v-model="form.endpoint" placeholder="请输入OSS地域名称" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="节点名称" prop="bucketName">
            <a-input v-model="form.bucketName" placeholder="请输入节点名称" />
          </a-form-model-item>
        </a-col> -->
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizCompanyEditForm from "./BizCompanyForm";
export default {
  ...BizCompanyEditForm,
};
</script>
